<?php if (!defined('THINK_PATH')) exit();?><!--<meta http-equiv="refresh" content="1"/>-->
<link href="/Public/Home/css/sane.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<!--<link href="/Public/css/bootstrap.css"  type="text/css" rel="stylesheet"/>-->
<!--<script src="/Public/js/bootstrap.js" type="text/javascript"></script>-->
<!--<script src="/Public/js/layer/layer.js" type="text/javascript"></script>-->
<!--<script src="/Public/js/jquery.js" type="text/javascript"></script>-->
<!--<script src="/Public/Home/js/bookRefer.js" type="text/javascript"></script>-->
<div class="c-main-left-content">
    <div class="con_title">
        <h3>填写订单</h3>
    </div>
    <div class="title_tip">
        <img class="record_icon" src="/Public/img/record_01.jpg"/>
        <span class="record_news">请详细的填写订单。</span>
    </div>

    <div class="box_box">
        <form action="<?php echo U('Home/BookManage/buyInfoAdd');?>" method="post">
            <div class="big_box">
                <div  class="buy_span">
                    <span>收货人信息</span>
                    <a href="<?php echo U('Home/Trade/userManage');?>"><button type="button" style="cursor: pointer">修改个人信息</button></a>
                </div>
                <div class="per_box">
                    <div class="per_box_box">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['u_status']); ?>" name="u_status">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['real_name']); ?>" name="real_name">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['u_address']); ?>" name="u_address">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['u_tel']); ?>" name="u_tel">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['bank']); ?>" name="bank">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['bank_number']); ?>" name="bank_number">
                        <input type="hidden" value="" name="buy_type" id="buy_type">
                        <input type="hidden" value="<?php echo ($_bookShowInfo['book_name']); ?>" name="book_name">
                        <input type="hidden" value="<?php echo ($_bookShowInfo['book_price']); ?>" name="book_price">
                        <input type="hidden" value="<?php echo ($_bookShowInfo['book_id']); ?>" name="book_id">
                        <?php if($_getUserInfoById['u_status'] == 1): ?><span>未认证</span><?php endif; ?>
                        <?php if($_getUserInfoById['u_status'] == 3): ?><span>待认证</span><?php endif; ?>
                        <?php if($_getUserInfoById['u_status'] == 2): ?><span><?php echo ($_getUserInfoById['real_name']); ?></span><?php endif; ?>
                        <?php if($_getUserInfoById['u_address'] == null): ?><span>请完善收货地址</span>
                            <?php else: ?>
                            <span><?php echo ($_getUserInfoById['u_address']); ?></span><?php endif; ?>
                        <?php if($_getUserInfoById['u_tel'] == null): ?><span>请完善联系电话</span>
                            <?php else: ?>
                            <span><?php echo ($_getUserInfoById['u_tel']); ?></span><?php endif; ?>
                    </div>
                </div>
                <!-------------------------->
                <div  class="buy_span">
                    <span>支付方式</span>
                    <a href="<?php echo U('Home/BookManage/buyBankPwd');?>"><button type="button" style="display: none;cursor: pointer" id="x9">设置密码</button></a>
                    <a href="<?php echo U('Home/Trade/tradePassword');?>"><button type="button" style="display: none;cursor: pointer" id="x1">修改密码</button></a>
                    <a href="<?php echo U('Home/Trade/attestationInfo');?>" ><button type="button" style="display: none;cursor: pointer" id="x5">绑定银联</button></a>
                </div>
                <div class="per_box">
                    <div class="per_box_box" style="display: none" id="x3">
                        <span><?php echo ($_getUserInfoById['bank']); ?></span>
                        <span><?php echo ($_getUserInfoById['bank_number']); ?></span>
                    </div>
                    <div class="per_box_box" style="display: none" id="x4">
                        <span>您还未绑定银行卡，请进行银行卡绑定</span>
                        <input type="hidden" value="<?php echo ($_getUserInfoById['bank']); ?>" id="x6">
                        <input type="hidden" value="<?php echo ($_getUserInfoById['bank_pwd']); ?>" id="x8">
                    </div>
                    <div class="per_box_box box_xx" style="display: block" id="x2">
                        <span onclick="cash()" style="cursor: pointer">货到付款</span>
                        <span onclick="changeInfo()" style="cursor: pointer" id="x7">银联支付</span>
                    </div>
                </div>
                <!-------------------------->
                <div  class="buy_span">
                    <span>配送方式</span>
                </div>
                <div class="per_box">
                    <div class="per_box_box">
                        <span>小魏快递</span>
                        <span>配送时间：根据地域不同，送达时间大约3-6天</span>
                    </div>
                </div>
                <!---------------------------------->
                <div  class="buy_span">
                    <span>送货清单</span>
                </div>
                <div class="per_box">
                    <div class="per_box_box">
                        <span>《<?php echo ($_bookShowInfo['book_name']); ?>》</span>
                        <span>￥<?php echo ($_bookShowInfo['book_price']); ?></span>
                        <span>数量：1 本</span>
                        <span style="color: red">7天无理由退货</span>
                    </div>
                </div>
            </div>
            <div class="box_submit" style="display: none" id="x10">
                <div class="pwd_button_box">
                    <span>交易密码：</span>
                    <input type="password" name="bank_pwd">
                </div>
            </div>
            <div class="box_submit">
                <div class="box_right">
                    <input type="submit" value="提交订单">
                </div>
            </div>
        </form>
    </div>
</div>
<script>
   function changeInfo(){
       var zz=$('#x6').val();
       var z1=$('#x8').val();
       if(zz.length>0&&z1.length>0){
           $("#x2").css('display','none');
           $("#x1").css('display','block');
           $("#x3").css('display','block');
           $("#x10").css('display','block');
           $("#buy_type").val("2");
       }
       if(zz.length>0&&z1==''){
           $("#x2").css('display','none');
           $("#x9").css('display','block');
           $("#x3").css('display','block');
           $("#buy_type").val("4");
       }
       if(zz==''){
           $("#x2").css('display','none');
           $("#x4").css('display','block');
           $("#x5").css('display','block');
           $("#buy_type").val("3");
       }
   }
    function cash(){
        $("#x7").css('display','none');
        $("#buy_type").val("1");
    }
</script>